﻿function ChangeNewsList(n){
	if (n>=1&&n<=2){
		for (i=1;i<=2;i++)
		{
			if (i==n)
			 {
					showdiv();
			 }
			else
			 {
					hidediv();
			 }
		}
	}
		
	if (n>=3&&n<=4){
		for (i=3;i<=4;i++)
		{
			if (i==n)
			 {
					showdiv();
			 }
			else
			 {
					hidediv();
			 }
		}
	}
	
	if (n>=5&&n<=6){
		for (i=5;i<=6;i++)
		{
			if (i==n)
			 {
					showdiv();
			 }
			else
			 {
					hidediv();
			 }
		}
	}		
}



function showdiv(){	
document.getElementById("NewsLists"+i).style.display = "block";
document.getElementById("NewsTab"+i).style.background = "#fff";
document.getElementById("NewsTab"+i).style.color = "#000";
}

function hidediv(){	
document.getElementById("NewsLists"+i).style.display = "none";
document.getElementById("NewsTab"+i).style.background = "";
document.getElementById("NewsTab"+i).style.color = "#fff";
}


function ShowchileNov(tmp){
	if (tmp==1){
		document.getElementById("child_nov").style.display = "block";
	}
	else{
		document.getElementById("child_nov").style.display = "none";
	}
}


//===================搜索框ajax调用
var xmlHttp = false;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}

function callServer(){
var u_name = document.getElementById("keyword").value;
//if ((u_name == null) || (u_name == "")) return;
var url = "/ShowSearchResult_ajax.asp?keyword=" + escape(u_name);
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);  
}

function updatePage() {
if (xmlHttp.readyState <= 0 ){
document.getElementById("ajax").innerHTML="loading...";
}
else
{
var response = xmlHttp.responseText;
document.getElementById("ajax").innerHTML=xmlHttp.responseText
}
}
var mouse_on_ajax = 0 ;
//document.writeln("<div onmouseover=\"mouse_on_ajax=1;\/\/alert(mouse_on_ajax);\" onmouseout=\"mouse_on_ajax=0;\/\/alert(mouse_on_ajax);\" onclick=\"this.style.display=\'none\';\" id=\"ajax\">(空)<\/div>");


//===================搜索框获得集点文字
function onFocust(text){
document.getElementById("ajax").style.display ="block";
}
//===================搜索框失去集点文字
function onBlurt(text){
//alert(mouse_on_ajax);
if (mouse_on_ajax == '0'){
document.getElementById("ajax").style.display ="none";
}
}

function showqq(tmp){
	if (tmp==1){
		document.getElementById("qqblock").style.display = "block";
	}
	else{
		document.getElementById("qqblock").style.display = "none";
	}
}

